Changes the current directory or drive.
現在のディレクトリないしドライブを変更します。
![]() | This runtime statement currently does not work as documented. See this issue for more information.
この実行時ステートメントは、現在、ドキュメントどおりに機能しません。詳細は、この課題の説明 を参照してください。 |
ChDir Text As String
ChDir Text As String
Text: Any string expression that specifies the directory path or drive.
Text:ディレクトリパスないしドライブを指定する文字列表式。
![]() | If you only want to change the current drive, enter the drive letter followed by a colon.
現在のドライブのみを変更するには、ドライブレターに続けてコロンを指定します。 |
Sub ExampleChDir
Sub ExampleChDir
Dim sDir1 as String , sDir2 as String
Dim sDir1 as String , sDir2 as String
sDir1 = "c:\Test"
sDir1 = "c:\Test"
sDir2 = "d:\private"
sDir2 = "d:\private"
ChDir( sDir1 )
ChDir( sDir1 )
msgbox CurDir
msgbox CurDir
ChDir( sDir2 )
ChDir( sDir2 )
msgbox CurDir
msgbox CurDir
end sub
end sub